﻿@model MultiRegionContent
@Cms.ScriptInclude("Themes/Admin/Scripts/tiny_mce/tiny_mce.js")
@Cms.ScriptInclude("Themes/Admin/Scripts/tiny_mce/jquery.tinymce.js")
@Cms.ScriptInclude("Themes/Admin/Scripts/tiny_mce/cms.tinymce.js")
@{ 
	int i = 0; 
}
<div id="contenttabs">
	<ul>
		@foreach (var kvp in Model.Content) {
			<li><a href="#tab_@(kvp.Key)">@Html.Label(String.Format("Content[{0}].Value", i), kvp.Key)</a></li>
			i++;
		}
	</ul>

	@{	
		i = 0; 
	}
	@foreach (var kvp in Model.Content) {
		<div id="tab_@(kvp.Key)">
			@Html.Hidden(String.Format("Content[{0}].Key", i), kvp.Key)
			@Html.TextArea(String.Format("Content[{0}].Value", i), kvp.Value, new { style = "width:100%;height:400px" })
			@{ i++; }
		</div>
	}
</div>

<script type="text/javascript">
    $(document).ready(function () {
    	enableTinyMce("textarea", "400px", "100%", "@Url.Action("Browse", "Files")");
        $('#contenttabs').tabs();
    });
</script>

<style type="text/css">
	.ui-tabs .ui-tabs-panel { padding:0; }
</style>
